import request from "@/utils/request"

export default {
    // 添加
    addComp(formData) {
        const req = request({
            method: 'post',
            url: '/competition/add',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    // 获取所有竞赛
    getListAll(formData) {
        const req = request({
            method: 'post',
            url: '/competition/getListAll',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    // 编辑
    editComp(formData) {
        const req = request({
            method: 'post',
            url: '/competition/edit',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    // 删除
    deleteComp(formData) {
        const req = request({
            method: 'post',
            url: '/competition/delete',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    // 报名提交
    submit(formData) {
        const req = request({
            method: 'post',
            url: '/competition/submit',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    //获取未分组的学生
    getStuNoGroup(formData) {
        const req = request({
            method: 'post',
            url: '/competition/getStuNoGroup',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    //提交参赛小组
    submitGroup(formData) {
        const req = request({
            method: 'post',
            url: '/competition/submitGroup',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    //获取参赛小组
    getGroup(formData) {
        const req = request({
            method: 'post',
            url: '/competition/getGroup',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    //更新小组成员
    updateGroupStu(formData) {
        const req = request({
            method: 'post',
            url: '/competition/updateGroupStu',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    //更新小组信息
    updateGroup(formData) {
        const req = request({
            method: 'post',
            url: '/competition/updateGroup',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    //获取某用户的竞赛信息
    getCompByUser(formData) {
        const req = request({
            method: 'post',
            url: '/competition/getCompByUser',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    //智能排版
    typeSetting(formData) {
        const req = request({
            method: 'post',
            url: '/upload/typeSetting',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    //审核
    updateGroupState(formData) {
        const req = request({
            method: 'post',
            url: '/competition/updateGroupState',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
    //通过学校获取项目小组
    getGroupBySchool(formData) {
        const req = request({
            method: 'post',
            url: '/competition/getGroupBySchool',
            data: formData,
            headers: {
                'Content-Type': "multipart/form-data"
            }
        })
        //返回ture or false
        return req
    },
}